{% extends "base.html" %}

{% block title %}Ops List{% endblock %}
{% block heading %}Ops List{% endblock %}

{% block leftmenu %}
	<a href='/newop'>New Operation</a><br/>
	<a href='/waitlist'>Waiting list</a><br/>
	<a href='/multipay'>Multipay</a><br/>
	<a href='/stats'>Stats</a><br/>
	<a href='/sitesigs'>Site Sigs</a><br/>
	<a href='/sites'>Site Types</a><br/>
{% endblock %}

{% block content %}
		<table border='0'>
			<tr class="standard">
				<th>Date (age)</th>
				<th>Name</th>
				<th>Type</th>
				<th>FC</th>
				<th>Location</th>
				<th>Pilots</th>
				<th>Locked</th>
				<th align='right'>ISK</th>
				<th>Paid</th>
			</tr>

		{% for op in ops %}
			<tr class="{% cycle odd,even%}">
				<td>{{op.op_date|date:"m-d"}} ({{op.age_str}})</td>
				<td><a href='/viewop?id={{op.key.id}}'>{{ op.name }}</a></td>
				<td>{{op.op_type}}</td>
				<td>{{op.fc}}</td>
				<td>{{op.system}}</td>
				<td>{{op.pilots|length}}&nbsp;&nbsp;&nbsp;
					{% for pilot in op.pilots %}
						{% ifequal pilot main_name %}*{% endifequal %}
					{% endfor %}
				</td>
				<td>{{op.locked|yesno:"Yes,No"}}&nbsp;&nbsp;&nbsp;
					{% if not op.locked %}
						<a href='/joinop?key={{op.key}}'>[Join]</a>
					{% endif %}</td>
				<td align='right'>{{op.op_isk_000}}</td>
				<td>{{op.paid|yesno:"Yes,No"}}</td>
			</tr>
		{% endfor %}

		</table>
		
		<p>
		Estimated payout: {{pilot_isk_000}} isk [{{main_name}}]
		</p>

		<!-- Cache hit: {{cache_hit}} -->

{% endblock %}
